<template>
    <div class="modal" v-show="isShowLoginModal">
        <div class="mask" @click="changeIsShowLoginModal(false)"></div>
        <div class="loginBox">
            <!-- 关闭按钮 -->
            <div class="close" @click="changeIsShowLoginModal(false)"></div>
            <section class="nav">
                <a href="javascript:;" :class="{ active: isShowPhone }"></a>
            </section>
        </div>
    </div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';

export default {
    data() {
        return {
            isShowPhone: true,
        }
    },
    computed: {
        ...mapState({ isShowLoginModal: state => state.showModal.isShowLoginModal })
    },
    methods: {
        ...mapMutations({ changeIsShowLoginModal: "showModal/changeIsShowLoginModal" })
    }
}
</script>
<style lang="less" scoped>
.modal {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;

    .mask {
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
    }

    .loginBox {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        width: 555px;
        height: 423px;
        background: url("../assets/img/login-box-bg.png");

        .close {
            position: absolute;
            right: 60px;
            top: 16px;
            height: 22px;
            width: 22px;
            background: url(../assets/img/close.png);
        }
    }
}
</style>